<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>Top News</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" type="text/css" media="screen" href="/css/app.css" />
    <script src="/css/app.js"></script>
</head>
<body>
    <div class="w">
        <div class="logo">
            <h1>TOP NEWS</h1>
        </div>
        <div class="box">
        @foreach ($news as $new)
            <div class="item">
                <h3><a href="/link/{{ $new->id }}">{{ $new->title }}</a><small>(<a href="?site={{$new->site}}">{{ $new->site }}</a>)</small></h3>
                <p>
                    <span>created at {{ $new->create_at }}</span>&nbsp;,
                    <span>viewd {{ $new->counter }}</span>
                </p>
            </div>
        @endforeach
            {{ $news->render() }}
        </div>
    </div>
</body>
</html>
